import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
// 插件
import { Camera } from "@ionic-native/camera";
import { ImagePicker } from "@ionic-native/image-picker";
import { Geolocation } from "@ionic-native/geolocation";

// 页面
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { CameraPage } from "../pages/camera/camera";
import { RefreshPage } from "../pages/refresh/refresh";
import { GeolocationPage } from "../pages/geolocation/geolocation";
import { ComponentsPage } from "../pages/components/components";
import { CombodyPage } from "../pages/combody/combody";
import { MenusPage } from "../pages/menus/menus";
import { PaymentPage } from "../pages/payment/payment";
import { MapPage } from "../pages/map/map";

// 组件
import { ComponentsModule} from "../components/components.module";

//引入请求数据的模块
import { HttpModule,JsonpModule} from "@angular/http";

@NgModule({
  declarations: [
      MyApp,
      HomePage,
      CameraPage,
      RefreshPage,
      GeolocationPage,
      ComponentsPage,
      CombodyPage,
      MenusPage,
      PaymentPage,
      MapPage
  ],
  imports: [
      BrowserModule,
      HttpModule,
      JsonpModule,
      ComponentsModule,
    // IonicModule.forRoot(MyApp),
      IonicModule.forRoot(MyApp,{
          tabsHideOnSubPages: 'true', //隐藏全部子页面 tabs
          backButtonText: '返回' /*配置返回按钮*/
      })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
      MyApp,
      HomePage,
      CameraPage,
      RefreshPage,
      GeolocationPage,
      ComponentsPage,
      CombodyPage,
      MenusPage,
      PaymentPage,
      MapPage
  ],
  providers: [
      StatusBar,
      SplashScreen,
      Camera,ImagePicker,Geolocation,
      {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
